package com.itboye.mengwu.data.presenter;

import java.util.List;
import java.util.Observer;

import com.itboye.core.interfaces.ICompleteListener;
import com.itboye.core.object.BasePresenter;
import com.itboye.core.object.ResultEntity;
import com.itboye.mengwu.app.ui.main.MainPresenter;
import com.itboye.mengwu.data.interfaces.ILuntanTotal;
import com.itboye.mengwu.data.interfaces.IMyLunTan;
import com.itboye.mengwu.data.model.LuntanTieZiBean;
import com.itboye.mengwu.data.repository.LuntanRepository;
import com.itboye.mengwu.data.repository.MyLunTanRepository;

public class TieZiPresenter extends BasePresenter implements
		ILuntanTotal<LuntanTieZiBean> {
	// 发表帖子
	public static final String AddTieZiSuccess = MainPresenter.class.getName()
			+ "_AddTiezi_success";
	public static final String AddTieZiFail = MainPresenter.class.getName()
			+ "_AddTiezi_failure";
	// 查询我的帖子
	public static final String MyTieZi_SUCCESS = MainPresenter.class.getName()
			+ "_MyTieZi_success";
	public static final String MyTieZi_FAILE = MainPresenter.class.getName()
			+ "_MyTieZi_failure";
	// 查询我的评论
	public static final String Mypinglun_SUCCESS = MainPresenter.class
			.getName() + "_Mypinglun_success";
	public static final String Mypinglun_FAILE = MainPresenter.class.getName()
			+ "_Mypinglun_failure";
	// 查询我的帖子评论
	public static final String MyTieziPinglun_SUCCESS = MainPresenter.class
			.getName() + "_MyTieziPinglun_success";
	public static final String MyTieziPinglun_FAILE = MainPresenter.class
			.getName() + "_MyTieziPinglun_failure";
	// 查询我的主题回复
	public static final String MyThemeReply_SUCCESS = MainPresenter.class
			.getName() + "_MyThemeReply_success";
	public static final String MyThemeReply_FAILE = MainPresenter.class
			.getName() + "_MyThemeReply_failure";
	// 帖子分页
	public static final String TieziFenYeSuccess = MainPresenter.class
			.getName() + "_MyThemeReply_success";
	public static final String TiezifenyeFail = MainPresenter.class.getName()
			+ "_MyThemeReply_failure";

	// 点赞
	public static final String DianzanSuccess = MainPresenter.class.getName()
			+ "_Dianzan_success";
	public static final String DianzanyeFail = MainPresenter.class.getName()
			+ "_Dianzan_failure";

	// 评论
	public static final String PinglunSuccess = MainPresenter.class.getName()
			+ "_Pinglun_success";
	public static final String PingLunFail = MainPresenter.class.getName()
			+ "_Pinglun_failure";

	// 回复评论
	public static final String huiFuPinglunSuccess = MainPresenter.class
			.getName() + "_HuifuPinglun_failure";
	public static final String huiFuPingLunFail = MainPresenter.class.getName()
			+ "_huifuPinglun_failure";

	// 查看帖子收藏
	public static final String QueryTieziCollectionSuccess = MainPresenter.class
			.getName() + "_QueryTieziCollection_failure";
	public static final String QueryTieziCollectionFail = MainPresenter.class.getName()
			+ "_QueryTieziCollection_failure";

	// 查看帖子详情
	public static final String XiangQingSuccess = MainPresenter.class.getName()
			+ "_XiangQing_success";
	public static final String XiangQingFail = MainPresenter.class.getName()
			+ "_XiangQing_failure";

	// 查看宝宝乐帖子详情
	public static final String BaoBaoLeXiangQingSuccess = MainPresenter.class
			.getName() + "_BaoBaoLeXiangQing_success";
	public static final String BaoBaoLeXiangQingXiangQingFail = MainPresenter.class
			.getName() + "_BaoBaoLeXiangQing_failure";

	// 收藏帖子
	public static final String CollectionTieziSuccess = MainPresenter.class
			.getName() + "_CollectionTiezi_success";
	public static final String CollectionTieziFail = MainPresenter.class
			.getName() + "_CollectionTiezi_failure";
	// 删除评论
	public static final String DeleteCommentSuccess = MainPresenter.class
			.getName() + "_DeleteComment_success";
	public static final String DeleteCommentFail = MainPresenter.class
			.getName() + "_DeleteComment_failure";

	// 删除回复
	public static final String DeletePingLunHuiFuSuccess = MainPresenter.class
			.getName() + "_DeletePingLunHui_success";
	public static final String DeletePingLunHuiFail = MainPresenter.class
			.getName() + "_DeletePingLunHui_failure";

	// 关注用户
	public static final String GuanzhuSuccess = MainPresenter.class.getName()
			+ "_Guanzhu_success";
	public static final String GuanzhuFail = MainPresenter.class.getName()
			+ "_Guanzhu_failure";

	// 删除评论
	public static final String mytieziSuccess = MainPresenter.class.getName()
			+ "_mytiezi_success";
	public static final String mytieziFail = MainPresenter.class.getName()
			+ "_mytiezi_failure";

	// 删除帖子
	public static final String TieziDeleteSuccess = MainPresenter.class
			.getName() + "_mytieziDelete_success";
	public static final String TieziDeleteFail = MainPresenter.class.getName()
			+ "_mytieziDelete_Fail";

	public static final String GetCommentsOrHuiFuBaobaoLeSuccess = MainPresenter.class
			.getName() + "_GetCommentsOrHuiFuBaobaoLe_success";
	public static final String GetCommentsOrPingLunBaobaoLeFail = MainPresenter.class
			.getName() + "_GetCommentsOrHuiFuBaobaoLe_Fail";

	// 查看帖子回复详情
	public static final String HuiFuXiangQingDetailSuccess = MainPresenter.class
			.getName() + "_GetCommentsOrHuiFuDetail_success";
	public static final String HuiFuXiangQingDetailFail = MainPresenter.class
			.getName() + "_GetCommentsOrHuiFuDetail_Fail";
	// 帖子标签
	public static final String GetTieZiBaioQianSuccess = MainPresenter.class
			.getName() + "_GetTieZiBaioQian_success";
	public static final String GetTieZiBaioQianFail = MainPresenter.class
			.getName() + "_GetTieZiBaioQian_Fail";

	// 帖子标签
	public static final String ShopFaBuSuccess = MainPresenter.class.getName()
			+ "_ShopFaBu_success";
	public static final String ShopFaBuFail = MainPresenter.class.getName()
			+ "_ShopFaBu_Fail";

	// 删除图片
	public static final String ImageDeleteSuccess = MainPresenter.class
			.getName() + "_ImageDelete_success";
	public static final String ImageDeleteFail = MainPresenter.class.getName()
			+ "_ImageDelete_Fail";

	// 时光机修改帖子
	public static final String MengTimesEditSuccess = MainPresenter.class
			.getName() + "_MengTimesEdit_success";
	public static final String MengTimesEditFail = MainPresenter.class
			.getName() + "_MengTimesEdit_Fail";

	public TieZiPresenter(Observer observer) {
		super(observer);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void add(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(AddTieZiSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(AddTieZiFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.add(model);
	}

	@Override
	public void delete(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TieziDeleteSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TieziDeleteFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.delete(model);
	}

	@Override
	public void update(LuntanTieZiBean model) {
		// TODO Auto-generated method stub

		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(mytieziSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(mytieziFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.update(model);// (model);

	}

	@Override
	public void getInfo(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TieziFenYeSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TiezifenyeFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.zhuTiFenye(model);
	}

	@Override
	public List<LuntanTieZiBean> query(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void zhuTiFenye(LuntanTieZiBean model) {
		// TODO Auto-generated method stub

	}

	@Override
	public void favorite(String tid, String uid, String value) {
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(CollectionTieziSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(CollectionTieziFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.favorite(tid, uid, value);
	}

	@Override
	public void queryCollection(String uid, String fid, String pageNo,String pageSize) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(QueryTieziCollectionSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(QueryTieziCollectionFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.queryCollection(uid, fid, pageNo,pageSize);// (uid, like, tid);
	}

	@Override
	public void dianzan(String uid, String like, String tid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DianzanSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(DianzanyeFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.dianzan(uid, like, tid);
	}

	@Override
	public void zhutiXiangqing(String uid, String tid, String maxPingLun) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(XiangQingSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(XiangQingFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.zhutiXiangqing(uid, tid, maxPingLun);
	}

	@Override
	public void pinglun(String fid, String tid, String authorId,
			String comment, StringBuilder attachments, String subject) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(PinglunSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(PingLunFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.pinglun(fid, tid, authorId, comment, attachments, subject);
	}

	@Override
	public void huiFuPingLun(String fid, String pid, String tid,
			String authorId, String comment, String toUid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(huiFuPinglunSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(huiFuPingLunFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.huiFuPingLun(fid, pid, tid, authorId, comment, toUid);
	}

	@Override
	public void deletePingLun(String uid, String fid, String tid, String pid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeleteCommentSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(DeleteCommentFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.deletePingLun(uid, fid, tid, pid);// (fid,pid, tid, authorId,
													// comment, toUid);
	}

	@Override
	public void selseceTiezi(String uid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeleteCommentSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(DeleteCommentFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.selseceTiezi(uid);
	}

	@Override
	public void guanzhu(String uid, String bUid, String value) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(GuanzhuSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(GuanzhuFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.guanzhu(uid, bUid, value);// (uid);
	}

	@Override
	public void MePingLun(String uid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeleteCommentSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(DeleteCommentFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.MePingLun(uid);// (fid,pid, tid, authorId, comment, toUid);
	}

	@Override
	public void MyTieZi(String uid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeleteCommentSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(DeleteCommentFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.MyTieZi(uid);
	}

	@Override
	public void getBabayLe(String uid, String fid, String pageNo,String fresh) {
		// TODO Auto-generated method stub
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TieziFenYeSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(TiezifenyeFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.getBabayLe(uid, fid, pageNo, fresh);
	}

	@Override
	public void getBaoBaoLePinglunAndHuiFu(String tid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(GetCommentsOrHuiFuBaobaoLeSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(GetCommentsOrPingLunBaobaoLeFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.getBaoBaoLePinglunAndHuiFu(tid);
	}

	@Override
	public void deleteComment(String uid, String tid, String pid, String cid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeletePingLunHuiFuSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(DeletePingLunHuiFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.deleteComment(uid, tid, pid, cid);// (tid);
	}

	@Override
	public void baoBaoLeDetailComment(String uid, String tid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(BaoBaoLeXiangQingSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(BaoBaoLeXiangQingXiangQingFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.baoBaoLeDetailComment(uid, tid);
	}

	@Override
	public void getHuiFuDetail(String fid, String tid, String pid) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(HuiFuXiangQingDetailSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(HuiFuXiangQingDetailFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.getHuiFuDetail(fid, tid, pid);
	}

	@Override
	public void TieZiBiaoQian(String uid, String tag_id, String fid,
			String page_no) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(GetTieZiBaioQianSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(GetTieZiBaioQianFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.TieZiBiaoQian(uid, tag_id, fid, page_no);

	}

	@Override
	public void ShopPingJia(String uid, String pid, String content) {
		// TODO Auto-generated method stub ShopFaBu
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(ShopFaBuSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(ShopFaBuFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.ShopPingJia(uid, pid, content);
	}

	@Override
	public void deleteImage(String uid, String tid, String imgId) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(ImageDeleteSuccess);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(ImageDeleteFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.deleteImage(uid, tid, imgId);
	}

	@Override
	public void editMyTieZi(String uid, String tid, String message,String stringBuilder) {
		// TODO Auto-generated method stub
		ILuntanTotal<LuntanTieZiBean> lunTan = new LuntanRepository(
				new ICompleteListener() {

					@Override
					public void success(ResultEntity result) {
						// TODO Auto-generated method stub
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Success);
						result.setEventType(MengTimesEditSuccess);//fkdogkmdofkod
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}

					@Override
					public void failure(ResultEntity result) {
						// TODO Auto-generated method stub
						result.setEventTag(Tag_Error);
						result.setEventType(MengTimesEditFail);
						TieZiPresenter.this.setChanged();
						TieZiPresenter.this.notifyObservers(result);
					}
				});
		lunTan.editMyTieZi(uid, tid, message,stringBuilder);//(uid, tid, imgId);
		
	}
}